rm(list = ls())

## packages 

library(tidyverse)
library(kableExtra)
library(fastDummies)

## Load summary stats   

summary_all <- readRDS('data/tabA36.rds') 

# To Tex Table 

tab_tex <- summary_all %>%
  arrange((Variable)) %>% 
  kableExtra::kable(., format = 'latex', 
                    booktabs = T,
                    linesep = "",
                    label = 'sumstat_civey',
                    caption = 'Summary statistics',
                    digits = 2) %>%
  footnote(footnote_as_chunk = T, threeparttable = T,
           general = "The Table shows summary statistics for the Civey survey data.") %>%
  kable_styling(latex_options = c("HOLD_position"), 
                position = "center",
                full_width = F,
                font_size = 10) 



tab_tex



